public class TestDemo {
    public static void main(String[] args) {
        Date date = new Date();
//        date.year = 1990;  无法访问year
        date.setYear(1999);
        System.out.println("获取年份： "+date.getYear());
        date.month = 5;
        date.day = 15;
        date.print();
    }
}
